package pl.org.lutra.planner.model.util;

public class ModelUtil {
    
    public static final int DESCENT_RATE = 20;
    public static final int ASCENT_RATE = 10;
    
    public static float getTravelTime(float startDepth, float targetDepth) {
        float travelTime = 0;
        
        float depthDelta = startDepth - targetDepth;
        if (depthDelta != 0) {
            travelTime = Math.abs(depthDelta <= 0 ? depthDelta / DESCENT_RATE : depthDelta / ASCENT_RATE);
        }
        
        return travelTime;
    }
    
}
